@extends('layouts.backend')
@section('title')
    系统配置
@endsection

@section('body')
    <div class="row">
        <div class="ibox">
            <div class="ibox-title">
                <h5>系统配置</h5>
            </div>
            <div class="ibox-content">
                <form action="" method="post">
                    @csrf
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#system"> 系统设置</a></li>
                    </ul>
                    <div class="tab-content ">
                        <div id="system" class="tab-pane active">
                            <div class="panel-body">
                                <div class="form-group">
                                    <label>缓存开关（缓存开启之后会提高网站性能）</label><br>
                                    <input type="radio" name="page_cache" value="1"
                                        {{setting('page_cache') == 1 ? 'checked' : ''}}> 开启
                                    <input type="radio" name="page_cache" value="-1"
                                        {{setting('page_cache') != 1 ? 'checked' : ''}}> 不开启
                                </div>
                                <div class="form-group">
                                    <label>备份开关（将会自动备份网站和数据库数据）</label><br>
                                    <input type="radio" name="system_backup" value="1"
                                        {{setting('system_backup') == 1 ? 'checked' : ''}}> 开启
                                    <input type="radio" name="system_backup" value="-1"
                                        {{setting('system_backup') != 1 ? 'checked' : ''}}> 不开启
                                </div>
                                <div class="form-group">
                                    <label>登陆日志</label><br>
                                    <input type="radio" name="login_log" value="1"
                                        {{setting('login_log') == 1 ? 'checked' : ''}}> 开启
                                    <input type="radio" name="login_log" value="-1"
                                        {{setting('login_log') != 1 ? 'checked' : ''}}> 不开启
                                </div>
                                <div class="form-group">
                                    <label>操作日志开关</label><br>
                                    <input type="radio" name="operator_log" value="1"
                                        {{setting('operator_log') == 1 ? 'checked' : ''}}> 开启
                                    <input type="radio" name="operator_log" value="-1"
                                        {{setting('operator_log') != 1 ? 'checked' : ''}}> 不开启
                                </div>
                                <div class="form-group">
                                    <label>登陆白名单(注意:开启后,只允许以下ip登陆后台,请慎重操作)</label><br>
                                    <input type="text" name="ip_white_list" class="form-control" value="{{setting('ip_white_list')}}" />
                                    <span class="help-block">多个ip以竖线(|)隔开</span>

                                </div>
                                <div class="form-group">
                                    <label>统计代码</label>
                                    <textarea name="statistics_js"  cols="15" rows="5"  class="form-control" >{{config('statistics_js') || ''}}</textarea>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <button class="btn btn-primary" type="submit">保存</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
@endsection
